CUBE CONNECT Edition Help

Build Applications - Flow Control (Loops/Branches)

Your browser does not support HTML5 video.

Click here to play the video.

In this tutorial, we will look at how to create loops and branches. Loop control contains a set of programs and /or subgroups that will be executed a certain number of times when running. The loop settings are determined by the user and may define to run fixed number of iterations. Branch control references a set of groups within the application. When a model run reaches the control, it will select which group to execute based on pre-determined condition set within the control.

1. The example below already has three groups.

2. Click on Toolbar > Loop to create a new loop.

  • You can also right-click anywhere in the Application Editor > Add > Flow Control > Loop.

3. Assign the start node (execution order) and end node (execution order). Start node should be same number as the first item to be added and end node should be same number as last item to be added in the loop.

4. It is optional to set a maximum iterations value because there are other ways to set the iteration.

5. You can check/uncheck the box for Show Maximum Number of Iterations. For this exercise, leave the Show Containment Circle on Children as is. We will also not cover the Advanced options.

6. Click Update.

In the example below, there are two groups and a PILOT program. The PILOT will determine which path the branch shall take.

7. To create a new branch, click on Toolbar > Branch.

  • You can also right-click anywhere in the Application Editor > Add > Flow Control > Branch.

8. Fill out the necessary information. An example is provided below. The execution order of the program that determines the branch path should match in the second box. Provide a branch name and include all items that are part of the branch nodes. Leave the check boxes as is.

9. Click Update.